const template = require('art-template');
const path = require('path');

const views = path.join(__dirname, 'views', '数据循环.art');

const html = template(views, {
    user: [{
        name: '张三',
        age: 3,
        sex: '男'
    }, {
        name: '李四',
        age: 4,
        sex: '男'
    }, {
        name: '王五',
        age: 5,
        sex: '男'
    }]
});

console.log(html);